<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateOwnerTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_firstName}" for="firstName" />
                    <h:inputText id="firstName" value="#{ownerController.selected.firstName}" title="#{bundle.CreateOwnerTitle_firstName}" required="true" requiredMessage="#{bundle.CreateOwnerRequiredMessage_firstName}"/>
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_lastName}" for="lastName" />
                    <h:inputText id="lastName" value="#{ownerController.selected.lastName}" title="#{bundle.CreateOwnerTitle_lastName}" required="true" requiredMessage="#{bundle.CreateOwnerRequiredMessage_lastName}"/>
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_phone}" for="phone" />
                    <h:inputText id="phone" value="#{ownerController.selected.phone}" title="#{bundle.CreateOwnerTitle_phone}" required="true" requiredMessage="#{bundle.CreateOwnerRequiredMessage_phone}"/>
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_address}" for="address" />
                    <h:inputText id="address" value="#{ownerController.selected.address}" title="#{bundle.CreateOwnerTitle_address}" required="true" requiredMessage="#{bundle.CreateOwnerRequiredMessage_address}"/>
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_address2}" for="address2" />
                    <h:inputText id="address2" value="#{ownerController.selected.address2}" title="#{bundle.CreateOwnerTitle_address2}"/>
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_postcode}" for="postcode" />
                    <h:inputText id="postcode" value="#{ownerController.selected.postcode}" title="#{bundle.CreateOwnerTitle_postcode}" />
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_username}" for="username" />
                    <h:inputText id="username" value="#{ownerController.selected.username}" title="#{bundle.CreateOwnerTitle_username}" required="true" requiredMessage="#{bundle.CreateOwnerRequiredMessage_username}"/>
                    <h:outputLabel value="#{bundle.CreateOwnerLabel_user}" for="user" />
                    <h:selectOneMenu id="user" value="#{ownerController.selected.user}" title="#{bundle.CreateOwnerTitle_user}" required="true" requiredMessage="#{bundle.CreateOwnerRequiredMessage_user}">
                        <f:selectItems value="#{userController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{ownerController.create}" value="#{bundle.CreateOwnerSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{ownerController.prepareList}" value="#{bundle.CreateOwnerShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateOwnerIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
